package com.childmiles.gwt.client.event;

import com.childmiles.gwt.client.domain.AwardWinner;
import com.google.gwt.event.shared.GwtEvent;

public class ShowAwardsEvent extends GwtEvent<ShowAwardsEventHandler> {
    public static Type<ShowAwardsEventHandler> TYPE = new Type<ShowAwardsEventHandler>();
    
    private final AwardWinner awardWinner;

    public ShowAwardsEvent(AwardWinner awardWinner) {
        this.awardWinner = awardWinner;
    }

    @Override
    protected void dispatch(ShowAwardsEventHandler showAwardsEventHandler) {
        showAwardsEventHandler.onEvent(this);
    }

    @Override
    public Type<ShowAwardsEventHandler> getAssociatedType() {
        return TYPE;
    }

    public AwardWinner getAwardWinner() {
        return awardWinner;
    }
}
